package com.example.boot.service.aysnc_task.impl;

import com.example.boot.service.aysnc_task.IAysncService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AysncServiceImpl implements IAysncService {

    private static final Logger log = LoggerFactory.getLogger(AysncServiceImpl.class);

    @Override
    @Async
    public void testAysncTask() {
        try {
            Thread.sleep(5000);
            log.info("********异步任务测试*********");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
